<!DOCTYPE html>
<html lang="en">
	<head>
    	<meta name="layout" content="main_mobile">
        <title>发起方详情</title>       
        <link rel="stylesheet" href="${resource(dir: 'css', file: 'user_center.css')}" type="text/css">
        
        <link rel="stylesheet" href="${resource(dir: 'venobox', file: 'venobox.css')}" type="text/css">
    </head>
    <script>
    function IsPC() 
 	{ 
 	var userAgentInfo = navigator.userAgent; 
 	var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"); 
 	var flag = true; 
 	for (var v = 0; v < Agents.length; v++) { 
 	if (userAgentInfo.indexOf(Agents[v]) > 0) { flag = false; break; } 
 	} 
 	return flag; 
 	}
    
    </script>
    
<body>

	<section class="ui-container">	
        
        <ul class="ui-list ui-border-b user-top">
            <li>
                <div class="ui-avatar">
                	<g:if test="${user?.headimgurl != null}">
                		<span style="background-image:url(${user?.headimgurl})"></span>
                	</g:if>
                	<g:else>
                		<span style="background-image:url(${resource(dir:'images/demo',file:'demo-avatar-1.jpg')})"></span>
                	</g:else>                    
                </div>
                <a href="#" class="ui-list-info ui-border-t">
                    <h4 class="name">${user?.nickname}</h4>
                    <p class="ui-nowrap">${user?.school}</p>
                </a>
            </li>
        </ul>
        
        <div class="user-center-module ui-border-tb">
            <h4 class="ui-border-b">简介描述</h4>
            <div class="module-content">${user.description}</div>
        </div>
        
        
        <div class="user-center-module ui-border-tb">
            <h4 class="ui-border-b">发起的项目</h4>            
            <ul class="p-list">
                <input id="tip" type="hidden" value="false"/>
                <g:each in="${projects}" var="project">
                <g:if test="${project.verified=='pass' ||project.verified=='execute' ||project.verified=='expired' ||project.verified=='doing' ||project.verified=='over'}">
		            <li>
		            
		            <g:if test="${str=='pc' }">
		                 <a href="/scfire/project/projectDetailPC?projectid=${project.id}">
		            </g:if>
		            <g:else>
		                 <a href="/scfire/project/projectDetail?projectid=${project.id}">
		            </g:else>
		                    <div class="top" style="background-image:url(/scfire/project/imgRead?img=${project.img})">
		                        <div class="h3-box"><h3>${project.name}</h3></div>
		                        <div class="ui-progress">
		                            <span style="width:${project.progress}%"></span>
		                        </div>
		                        <g:if test="${project.progress==100}">
		                        	<div class="status yellow">已筹满</div>
		                        </g:if>
		                        <g:else>
		                        	<div class="status">募集中</div>
		                        </g:else>
		                    </div>
		                    <div class="bottom">
		                     <div class='infos'>
				                    <div class='infos-l'>共<span class='num'>${project.donateNum}</span>份爱心</div>
				                    <div class='infos-r'>已筹<span class='num'>${project.realAmount}</span>元</div>
			                    </div>
<%--		                        <div class="infos">--%>
<%--		                            <div class="infos-l">共<span class="num">${project.donateNum}</span>人捐助</div>--%>
<%--		                            <div class="infos-r">还差<span class="num"><g:formatNumber number="${project.rest}" format="0.00"/></span>元</div>--%>
<%--		                        </div>--%>
<%--		                        <div class="infos big">--%>
<%--		                            <div class="infos-l">已筹金额<span class="num"><g:formatNumber number="${project.realAmount}" format="0.00"/></span>元</div>--%>
<%--		                            <!--div class="infos-r">剩余天数<span class="num">0</span>天</div-->--%>
<%--		                        </div>--%>
		                        <div class="ui-btn-group">
		                       	</div>
		                    </div>
		                </a>
		            </li>
		            </g:if>
	           </g:each>
            </ul>
        </div>
	
		
        
        
    </section>


	<script type="text/javascript">

	var tab;
    (function() {
        tab = new fz.Scroll('.ui-tab', {
            role: 'tab',
            autoplay: false,
            interval: 3000
        });

        /* 滑动开始前 */
        tab.on('beforeScrollStart', function(from, to) {
            // from 为当前页，to 为下一页
        })

        /* 滑动结束 */
        tab.on('scrollEnd', function(curPage) {
            // curPage 当前页
        });

        $('.venobox').venobox({
            numeratio: true,
            border: '20px'
        });
        $('.venoboxvid').venobox({
            bgcolor: '#000'
        });
        $('.venoboxframe').venobox({
            border: '6px'
        });
        $('.venoboxinline').venobox({
            framewidth: '300px',
            frameheight: '250px',
            border: '6px',
            bgcolor: '#f46f00'
        });
        $('.venoboxajax').venobox({
            border: '30px;',
            frameheight: '220px'
        });
    })();

    function goTab (n) {
        var c = $('.ui-tab-content'), lis = $('.ui-tab-content > li');
        var newX = 0 - c.width() / lis.length * (n - 1);
        
        if (n >= 0 && n <= lis.length) {
            $('.ui-tab-nav > li').eq(n - 1).addClass('current').siblings().removeClass('current');
            lis.eq(n - 1).addClass('current').css('height', 'auto').siblings().removeClass('current').css('height', '0');
            tab.scrollTo(newX, 0);
            tab.currentPage = n - 1;
        }
    }
    </script>

</body>
</html>